package com.tm.transactional;

import com.tm.menum.TransactionType;
import com.tm.util.Task;

/**
 * @author laowu
 * @date 2020/9/22 14:23
 * @desc 分支事务
 */
public class MyTransaction {

    //事务ID
    private String transactionId;
    //事务类型
    private TransactionType transactionType;
    //事务组
    private String xid;
    //
    private Task task;
    public MyTransaction(String xid, String transactionId) {
        this.transactionId = transactionId;
        this.xid = xid;
        this.task = new Task();
    }

    public TransactionType getTransactionType() {
        return transactionType;
    }

    public void setTransactionType(TransactionType transactionType) {
        this.transactionType = transactionType;
    }

    public String getTransactionId() {
        return transactionId;
    }

    public void setTransactionId(String transactionId) {
        this.transactionId = transactionId;
    }

    public String getXid() {
        return xid;
    }

    public void setXid(String xid) {
        this.xid = xid;
    }

    public Task getTask() {
        return task;
    }
}
